<template>
  <el-dialog v-model="isVisible" title="Shipping address" width="50%" :before-close="handleClose">
    <el-text class="mx-1" size="large">点击了{{ type }}做出相应提示</el-text>
  </el-dialog>
</template>

<script setup>
import { ref, watch } from 'vue'
const isVisible = ref(false)

const props = defineProps({
  dialogVisible: {
    type: Boolean,
    default: false
  },
  type: {
    type: String,
    default: ''
  },
  activeIndex: {
    type: String,
    default: ''
  }
})

const emits = defineEmits({})

watch(
  () => props.dialogVisible,
  (newVal) => {
    isVisible.value = newVal
  },
  { deep: true }
)

const handleClose = () => {
  emits('onChangeVisible')
}
</script>

<style lang="scss" scoped></style>
